function h=drawobstacle(obs)
% drawobstacle: Draw specified obstacle object
%
% SYNTAX:
%   h = drawobstacle(obs)
%   Return handles of graphics objects representing the obstacle object.
%   The obstacle object obs should be created with function NEWOBSTACLE.

%   Author: Hongbin Ma
%   Last updated: 2009-6-2 with MATLAB 6.5
%   Problems or suggestions? Email me: mathmhb[at]163.com

h=[];
if isempty(obs)|isempty(obs.nodes),
    return;
end;
x=obs.nodes(:,1)+obs.pos(1);
y=obs.nodes(:,2)+obs.pos(2);
h=fill(x,y,obs.color);
